/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package gestureObservers;

import gesturetracking.CursorPanel;
import org.OpenNI.GesturePositionEventArgs;
import org.OpenNI.IObservable;
import org.OpenNI.IObserver;

/**
 *
 * @author xvanek9
 */
public class GestureInterStageCompletedObserver implements IObserver<GesturePositionEventArgs>{

    public CursorPanel panel;

    public void setPanel(CursorPanel panel) {
        this.panel = panel;
    }
    
    @Override
    public void update(IObservable<GesturePositionEventArgs> io, GesturePositionEventArgs args) {
        //System.out.println("Gesture " +args.getGesture()+ " started at " + args.getPosition().getX() + ", " + args.getPosition().getY() + ", " + args.getPosition().getZ());
        //System.out.println("Gesture " + args.getGesture() + " in progress.");
        if (panel != null){
            panel.paintCursor(args.getPosition());
        }
    }
    
}
